feat: Add prometheus.createSilence and prometheus.expireSilence#3219
Merged
forestileao merged 5 commits intosuperplanehq:mainfrom Feb 23, 2026
Merged
feat: Add prometheus.createSilence and prometheus.expireSilence#3219forestileao merged 5 commits intosuperplanehq:mainfrom
forestileao merged 5 commits intosuperplanehq:mainfrom
Conversation
Signed-off-by: Akinniranye Samuel Tomiwa <benneu40@gmail.com>
Signed-off-by: Akinniranye Samuel Tomiwa <bennueu40@gmail.com>
Collaborator
|
@samuel-asleep The code is good and the logic looks very straightforward, I will just test on my own prometheus and we should be good :) |
Contributor
Author
Thanks for the review! Sounds good 👍 Let me know if anything comes up during testing. |
Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
Collaborator
|
@samuel-asleep Just update the Silence field from the expireSilence to resourceType. And updated the UI. cc: @AleksandarCole |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements two new Prometheus Alertmanager action components for managing silences in workflows.
Backend (
pkg/integrations/prometheus/)client.go: AddedCreateSilence(SilencePayload) (string, error)(POST /api/v2/silences) andExpireSilence(silenceID string) error(DELETE /api/v2/silence/{silenceID}). RefactoredexecRequestto delegate to newexecRequestWithBodywhich setsContent-Type: application/jsonfor requests with a body. AddedMatcher,SilencePayload, andsilenceResponsestructs aligned with the Alertmanager OpenAPI spec (isRegexrequired,isEqualoptional with defaulttrue).create_silence.go: Validates matchers (non-empty, name+value required), parses duration viatime.ParseDuration, computesstartsAt = now/endsAt = now + durationin RFC3339, emitsprometheus.silencepayload, storesCreateSilenceNodeMetadata{SilenceID}.expire_silence.go: AcceptssilenceID(supports expressions for workflow chaining), callsExpireSilence, emitsprometheus.silence.expiredpayload, storesExpireSilenceNodeMetadata{SilenceID}.prometheus.go: Registered both components inComponents().example.go+ JSON files: Added embedded example outputs for both components.Frontend (
web_src/src/pages/workflowv2/mappers/prometheus/)create_silence.ts: Node metadata shows silence ID (bell-off) and matcher count; execution details show full silence info.expire_silence.ts: Node metadata shows silence ID (bell); execution details show ID and status.index.ts: Registered both mappers and addedeventStateRegistryentries ("created","expired").types.ts: AddedCreateSilenceConfiguration,ExpireSilenceConfiguration,PrometheusSilencePayload, andPrometheusMatcherinterfaces.Demo Video
2026-02-22.12-59-59.mp4
partially implements #3083 will create a second pr to complete it